class MembershipMigr < ActiveRecord::Migration
  def self.up
    rename_table :projects_users, :memberships
    add_column :memberships, :id, :primary_key
    add_column :memberships, :active, :integer, :default => 1
    remove_column :projects, :active
  end

  def self.down
    rename_table :memberships, :projects_users
    remove_column :projects_users, :id
    remove_column :projects_users, :active
    add_column :projects, :active, :integer, :default => 1
  end
end
